<div id="bodyPan">
<h1>New webcomic</h1>

<% form_for(@webcomic) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  
  <table id="categories_table">
	<tr>
  <% i = 0 %>
  <% for category in @category_list do %>
	<td>
   	<%= check_box('checkbox', category.name) %>
	<%= category.name %>
	</td>
	<% i = i+1 %>
	<% if (i == 5)%>
	 	<% i = 0 %>
		</tr>
		<tr>
	<% end %>
  <% end %>
  </tr>
  </table>
  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>

<%= link_to 'Back', webcomics_path %>
</div>